package main

import "fmt"

func foo() int {
	return 1
}

func main() {
	var breakAgain bool
	for x := 0; x < 10; x++ {
		for y := 0; y < 10; y++ {
			if y == 2 {
				breakAgain = true
				break
			}
		}
		if breakAgain == true {
			fmt.Println("break")
			break
		}
	}
	fmt.Println("done")

	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			fmt.Println(j)
			if j == 2 {
				goto breakHere
			}
		}
	}
	return
breakHere:
	fmt.Println("done")

	err := foo()
	if err != 2 {
		goto onExit
	}
	if err != 3 {
		goto onExit
	}
	if err != 1 {
		goto onExit
	}
	return
onExit:
	fmt.Println("error")
}
